<?php
class Application_Form_Decorators_Errors extends Zend_Form_Decorator_Errors
{
/**
* Render errors
*
* @param string $content
* @return string
*/
	public function render($content)
	{
		$element = $this->getElement();
		$view = $element->getView();
		if (null === $view) {
			return $content;
		}

		$errors = $element->getMessages();
		if (empty($errors)) {
			return $content;
		}

		$separator = $this->getSeparator();
		$placement = $this->getPlacement();
		$label = $element->getLabel();
		$html = '';
		foreach($errors as $err)
		{
			$html .= "<label class='error' style='display:inline'>$err</label>";
		}

		switch ($placement) {
			case self::APPEND:
				return $content . $separator . $html;
			case self::PREPEND:
				return $html . $separator . $content;
		}
	}
}